package com.nbsaas.boot.customer.rest.convert;

import com.nbsaas.boot.customer.data.entity.CustomerGroup;
import com.nbsaas.boot.customer.api.domain.request.CustomerGroupRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 客户分组请求对象转换成实体对象
*/

public class CustomerGroupEntityConvert  implements Converter<CustomerGroup, CustomerGroupRequest> {

    @Override
    public CustomerGroup convert(CustomerGroupRequest source) {
        CustomerGroup result = new CustomerGroup();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

